import MkView, { Layout, ImageView as I, RectView, TextView } from 'mk-view';
import utils from './utils';

class ImageView extends I {

    public static async loadImage(src: string): Promise<HTMLImageElement> {
        src = await utils.cacheImage(src);
        src = await utils.toBase64(src);
        return super.loadImage(src);
    }
}

export {
    MkView,
    Layout,
    ImageView,
    RectView,
    TextView
}
